8 import org.mozilla.javascript.*;
9 import xdc.services.intern.xsr.*;
10 import xdc.services.spec.Session;
14 static final String VERS =
"@(#) xdc-z63\n";
16 static final Proto.Elm $$T_Bool = Proto.Elm.newBool();
17 static final Proto.Elm $$T_Num = Proto.Elm.newNum();
18 static final Proto.Elm $$T_Str = Proto.Elm.newStr();
19 static final Proto.Elm $$T_Obj = Proto.Elm.newObj();
21 static final Proto.Fxn $$T_Met =
new Proto.Fxn(
null,
null, 0, -1,
false);
22 static final Proto.Map $$T_Map =
new Proto.Map($$T_Obj);
23 static final Proto.Arr $$T_Vec =
new Proto.Arr($$T_Obj);
25 static final XScriptO $$DEFAULT =
Value.DEFAULT;
26 static final Object $$UNDEF = Undefined.instance;
28 static final Proto.Obj $$Package = (Proto.Obj)Global.get(
"$$Package");
29 static final Proto.Obj $$Module = (Proto.Obj)Global.get(
"$$Module");
30 static final Proto.Obj $$Instance = (Proto.Obj)Global.get(
"$$Instance");
31 static final Proto.Obj $$Params = (Proto.Obj)Global.get(
"$$Params");
33 static final Object $$objFldGet = Global.get(
"$$objFldGet");
34 static final Object $$objFldSet = Global.get(
"$$objFldSet");
35 static final Object $$proxyGet = Global.get(
"$$proxyGet");
36 static final Object $$proxySet = Global.get(
"$$proxySet");
37 static final Object $$delegGet = Global.get(
"$$delegGet");
38 static final Object $$delegSet = Global.get(
"$$delegSet");
50 ArrayList<Object> imports =
new ArrayList<Object>();
51 ArrayList<Object> loggables =
new ArrayList<Object>();
52 ArrayList<Object> mcfgs =
new ArrayList<Object>();
53 ArrayList<Object> icfgs =
new ArrayList<Object>();
54 ArrayList<String> inherits =
new ArrayList<String>();
55 ArrayList<Object> proxies =
new ArrayList<Object>();
56 ArrayList<Object> sizes =
new ArrayList<Object>();
57 ArrayList<Object> tdefs =
new ArrayList<Object>();
61 Global.callFxn(
"loadPackage", xdcO,
"xdc");
62 Global.callFxn(
"loadPackage", xdcO,
"xdc.corevers");
63 Global.callFxn(
"loadPackage", xdcO,
"xdc.tools.product");
68 pkgP = (Proto.Obj)om.bind(
"ti.mcu.msp430.driverlib.product.Package",
new Proto.Obj());
69 pkgV = (
Value.Obj)om.bind(
"ti.mcu.msp430.driverlib.product",
new Value.Obj(
"ti.mcu.msp430.driverlib.product", pkgP));
72 void ProductView$$OBJECTS()
77 po = (Proto.Obj)om.bind(
"ti.mcu.msp430.driverlib.product.ProductView.Module",
new Proto.Obj());
78 vo = (
Value.Obj)om.bind(
"ti.mcu.msp430.driverlib.product.ProductView",
new Value.Obj(
"ti.mcu.msp430.driverlib.product.ProductView", po));
79 pkgV.bind(
"ProductView", vo);
81 om.bind(
"ti.mcu.msp430.driverlib.product.ProductView.ProductElemDesc", om.findStrict(
"xdc.tools.product.IProductView.ProductElemDesc",
"ti.mcu.msp430.driverlib.product"));
84 void DriverLib$$OBJECTS()
89 po = (Proto.Obj)om.bind(
"ti.mcu.msp430.driverlib.product.DriverLib.Module",
new Proto.Obj());
90 vo = (
Value.Obj)om.bind(
"ti.mcu.msp430.driverlib.product.DriverLib",
new Value.Obj(
"ti.mcu.msp430.driverlib.product.DriverLib", po));
91 pkgV.bind(
"DriverLib", vo);
95 void ProductView$$CONSTS()
100 void DriverLib$$CONSTS()
103 om.bind(
"ti.mcu.msp430.driverlib.product.DriverLib.BASENAME",
"driverlib");
106 void ProductView$$CREATES()
113 void DriverLib$$CREATES()
120 void ProductView$$FUNCTIONS()
126 void DriverLib$$FUNCTIONS()
131 fxn = (Proto.Fxn)om.bind(
"ti.mcu.msp430.driverlib.product.DriverLib$$getFamilyPath",
new Proto.Fxn(om.findStrict(
"ti.mcu.msp430.driverlib.product.DriverLib.Module",
"ti.mcu.msp430.driverlib.product"), $$T_Str, 1, 1,
false));
132 fxn.addArg(0,
"deviceName", $$T_Str, $$UNDEF);
134 fxn = (Proto.Fxn)om.bind(
"ti.mcu.msp430.driverlib.product.DriverLib$$getLibPath",
new Proto.Fxn(om.findStrict(
"ti.mcu.msp430.driverlib.product.DriverLib.Module",
"ti.mcu.msp430.driverlib.product"), $$T_Str, 0, 0,
false));
136 fxn = (Proto.Fxn)om.bind(
"ti.mcu.msp430.driverlib.product.DriverLib$$getSrcRepo",
new Proto.Fxn(om.findStrict(
"ti.mcu.msp430.driverlib.product.DriverLib.Module",
"ti.mcu.msp430.driverlib.product"), $$T_Str, 1, 1,
false));
137 fxn.addArg(0,
"familyPath", $$T_Str, $$UNDEF);
140 void ProductView$$SIZES()
144 void DriverLib$$SIZES()
148 void ProductView$$TYPES()
156 cap = (Scriptable)Global.callFxn(
"loadCapsule", xdcO,
"ti/mcu/msp430/driverlib/product/ProductView.xs");
157 om.bind(
"ti.mcu.msp430.driverlib.product.ProductView$$capsule", cap);
158 po = (Proto.Obj)om.findStrict(
"ti.mcu.msp430.driverlib.product.ProductView.Module",
"ti.mcu.msp430.driverlib.product");
159 po.init(
"ti.mcu.msp430.driverlib.product.ProductView.Module", om.findStrict(
"xdc.tools.product.IProductView.Module",
"ti.mcu.msp430.driverlib.product"));
160 po.addFld(
"$hostonly", $$T_Num, 1,
"r");
161 po.addFld(
"homeModule", $$T_Str,
"ti.mcu.msp430.driverlib.product.DriverLib",
"wh");
162 po.addFld(
"linksToArray",
new Proto.Arr($$T_Str,
false), Global.newArray(
new Object[]{
"org.eclipse.rtsc.xdctools"}),
"wh");
163 po.addFld(
"driverLib", (Proto)om.findStrict(
"ti.mcu.msp430.driverlib.product.ProductView.ProductElemDesc",
"ti.mcu.msp430.driverlib.product"), $$DEFAULT,
"wh");
164 po.addFld(
"product", (Proto)om.findStrict(
"ti.mcu.msp430.driverlib.product.ProductView.ProductElemDesc",
"ti.mcu.msp430.driverlib.product"), $$DEFAULT,
"wh");
165 fxn = Global.get(cap,
"module$use");
166 if (fxn !=
null) om.bind(
"ti.mcu.msp430.driverlib.product.ProductView$$module$use",
true);
167 if (fxn !=
null) po.addFxn(
"module$use", $$T_Met, fxn);
168 fxn = Global.get(cap,
"module$meta$init");
169 if (fxn !=
null) om.bind(
"ti.mcu.msp430.driverlib.product.ProductView$$module$meta$init",
true);
170 if (fxn !=
null) po.addFxn(
"module$meta$init", $$T_Met, fxn);
171 fxn = Global.get(cap,
"module$validate");
172 if (fxn !=
null) om.bind(
"ti.mcu.msp430.driverlib.product.ProductView$$module$validate",
true);
173 if (fxn !=
null) po.addFxn(
"module$validate", $$T_Met, fxn);
174 fxn = Global.get(cap,
"getProductDescriptor");
175 if (fxn !=
null) po.addFxn(
"getProductDescriptor", (Proto.Fxn)om.findStrict(
"xdc.tools.product.IProductView$$getProductDescriptor",
"ti.mcu.msp430.driverlib.product"), fxn);
178 void DriverLib$$TYPES()
186 cap = (Scriptable)Global.callFxn(
"loadCapsule", xdcO,
"ti/mcu/msp430/driverlib/product/DriverLib.xs");
187 om.bind(
"ti.mcu.msp430.driverlib.product.DriverLib$$capsule", cap);
188 po = (Proto.Obj)om.findStrict(
"ti.mcu.msp430.driverlib.product.DriverLib.Module",
"ti.mcu.msp430.driverlib.product");
189 po.init(
"ti.mcu.msp430.driverlib.product.DriverLib.Module", $$Module);
190 po.addFld(
"$hostonly", $$T_Num, 1,
"r");
191 po.addFld(
"BASENAME", $$T_Str,
"driverlib",
"rh");
192 po.addFld(
"outputDir", $$T_Str, $$UNDEF,
"wh");
193 fxn = Global.get(cap,
"module$use");
194 if (fxn !=
null) om.bind(
"ti.mcu.msp430.driverlib.product.DriverLib$$module$use",
true);
195 if (fxn !=
null) po.addFxn(
"module$use", $$T_Met, fxn);
196 fxn = Global.get(cap,
"module$meta$init");
197 if (fxn !=
null) om.bind(
"ti.mcu.msp430.driverlib.product.DriverLib$$module$meta$init",
true);
198 if (fxn !=
null) po.addFxn(
"module$meta$init", $$T_Met, fxn);
199 fxn = Global.get(cap,
"module$validate");
200 if (fxn !=
null) om.bind(
"ti.mcu.msp430.driverlib.product.DriverLib$$module$validate",
true);
201 if (fxn !=
null) po.addFxn(
"module$validate", $$T_Met, fxn);
202 po.addFxn(
"getFamilyPath", (Proto.Fxn)om.findStrict(
"ti.mcu.msp430.driverlib.product.DriverLib$$getFamilyPath",
"ti.mcu.msp430.driverlib.product"), Global.get(cap,
"getFamilyPath"));
203 po.addFxn(
"getLibPath", (Proto.Fxn)om.findStrict(
"ti.mcu.msp430.driverlib.product.DriverLib$$getLibPath",
"ti.mcu.msp430.driverlib.product"), Global.get(cap,
"getLibPath"));
204 po.addFxn(
"getSrcRepo", (Proto.Fxn)om.findStrict(
"ti.mcu.msp430.driverlib.product.DriverLib$$getSrcRepo",
"ti.mcu.msp430.driverlib.product"), Global.get(cap,
"getSrcRepo"));
207 void ProductView$$ROV()
211 void DriverLib$$ROV()
217 pkgP.init(
"ti.mcu.msp430.driverlib.product.Package", (Proto.Obj)om.findStrict(
"xdc.IPackage.Module",
"ti.mcu.msp430.driverlib.product"));
218 Scriptable cap = (Scriptable)Global.callFxn(
"loadCapsule", xdcO,
"ti/mcu/msp430/driverlib/product/package.xs");
219 om.bind(
"xdc.IPackage$$capsule", cap);
221 fxn = Global.get(cap,
"init");
222 if (fxn !=
null) pkgP.addFxn(
"init", (Proto.Fxn)om.findStrict(
"xdc.IPackage$$init",
"ti.mcu.msp430.driverlib.product"), fxn);
223 fxn = Global.get(cap,
"close");
224 if (fxn !=
null) pkgP.addFxn(
"close", (Proto.Fxn)om.findStrict(
"xdc.IPackage$$close",
"ti.mcu.msp430.driverlib.product"), fxn);
225 fxn = Global.get(cap,
"validate");
226 if (fxn !=
null) pkgP.addFxn(
"validate", (Proto.Fxn)om.findStrict(
"xdc.IPackage$$validate",
"ti.mcu.msp430.driverlib.product"), fxn);
227 fxn = Global.get(cap,
"exit");
228 if (fxn !=
null) pkgP.addFxn(
"exit", (Proto.Fxn)om.findStrict(
"xdc.IPackage$$exit",
"ti.mcu.msp430.driverlib.product"), fxn);
229 fxn = Global.get(cap,
"getLibs");
230 if (fxn !=
null) pkgP.addFxn(
"getLibs", (Proto.Fxn)om.findStrict(
"xdc.IPackage$$getLibs",
"ti.mcu.msp430.driverlib.product"), fxn);
231 fxn = Global.get(cap,
"getSects");
232 if (fxn !=
null) pkgP.addFxn(
"getSects", (Proto.Fxn)om.findStrict(
"xdc.IPackage$$getSects",
"ti.mcu.msp430.driverlib.product"), fxn);
233 pkgP.bind(
"$capsule", cap);
234 pkgV.init2(pkgP,
"ti.mcu.msp430.driverlib.product",
Value.DEFAULT,
false);
235 pkgV.bind(
"$name",
"ti.mcu.msp430.driverlib.product");
236 pkgV.bind(
"$category",
"Package");
237 pkgV.bind(
"$$qn",
"ti.mcu.msp430.driverlib.product.");
238 pkgV.bind(
"$vers", Global.newArray(
"1, 0, 0"));
239 Value.Map atmap = (
Value.Map)pkgV.getv(
"$attr");
240 atmap.seal(
"length");
242 pkgV.bind(
"$imports", imports);
243 StringBuilder sb =
new StringBuilder();
244 sb.append(
"var pkg = xdc.om['ti.mcu.msp430.driverlib.product'];\n");
245 sb.append(
"if (pkg.$vers.length >= 3) {\n");
246 sb.append(
"pkg.$vers.push(Packages.xdc.services.global.Vers.getDate(xdc.csd() + '/..'));\n");
248 sb.append(
"pkg.build.libraries = [\n");
250 sb.append(
"pkg.build.libDesc = [\n");
252 Global.eval(sb.toString());
255 void ProductView$$SINGLETONS()
260 vo = (
Value.Obj)om.findStrict(
"ti.mcu.msp430.driverlib.product.ProductView",
"ti.mcu.msp430.driverlib.product");
261 po = (Proto.Obj)om.findStrict(
"ti.mcu.msp430.driverlib.product.ProductView.Module",
"ti.mcu.msp430.driverlib.product");
262 vo.init2(po,
"ti.mcu.msp430.driverlib.product.ProductView", $$DEFAULT,
false);
263 vo.bind(
"Module", po);
264 vo.bind(
"$category",
"Module");
265 vo.bind(
"$capsule", om.findStrict(
"ti.mcu.msp430.driverlib.product.ProductView$$capsule",
"ti.mcu.msp430.driverlib.product"));
266 vo.bind(
"$package", om.findStrict(
"ti.mcu.msp430.driverlib.product",
"ti.mcu.msp430.driverlib.product"));
272 vo.bind(
"ProductElemDesc", om.findStrict(
"xdc.tools.product.IProductView.ProductElemDesc",
"ti.mcu.msp430.driverlib.product"));
273 tdefs.add(om.findStrict(
"xdc.tools.product.IProductView.ProductElemDesc",
"ti.mcu.msp430.driverlib.product"));
274 vo.bind(
"$$tdefs", Global.newArray(tdefs.toArray()));
275 vo.bind(
"$$proxies", Global.newArray(proxies.toArray()));
276 vo.bind(
"$$mcfgs", Global.newArray(mcfgs.toArray()));
277 vo.bind(
"$$icfgs", Global.newArray(icfgs.toArray()));
278 inherits.add(
"xdc.tools.product");
279 vo.bind(
"$$inherits", Global.newArray(inherits.toArray()));
280 ((
Value.Arr)pkgV.getv(
"$modules")).add(vo);
281 ((
Value.Arr)om.findStrict(
"$modules",
"ti.mcu.msp430.driverlib.product")).add(vo);
282 vo.bind(
"$$instflag", 0);
283 vo.bind(
"$$iobjflag", 1);
284 vo.bind(
"$$sizeflag", 1);
285 vo.bind(
"$$dlgflag", 0);
286 vo.bind(
"$$iflag", 1);
287 vo.bind(
"$$romcfgs",
"|");
288 vo.bind(
"$$nortsflag", 0);
289 Proto.Str ps = (Proto.Str)vo.find(
"Module_State");
290 if (ps !=
null) vo.bind(
"$object", ps.newInstance());
291 vo.bind(
"$$meta_iobj", om.has(
"ti.mcu.msp430.driverlib.product.ProductView$$instance$static$init",
null) ? 1 : 0);
292 vo.bind(
"$$fxntab", Global.newArray());
293 vo.bind(
"$$logEvtCfgs", Global.newArray());
294 vo.bind(
"$$errorDescCfgs", Global.newArray());
295 vo.bind(
"$$assertDescCfgs", Global.newArray());
296 Value.Map atmap = (
Value.Map)vo.getv(
"$attr");
297 atmap.seal(
"length");
298 pkgV.bind(
"ProductView", vo);
299 ((
Value.Arr)pkgV.getv(
"$unitNames")).add(
"ProductView");
302 void DriverLib$$SINGLETONS()
307 vo = (
Value.Obj)om.findStrict(
"ti.mcu.msp430.driverlib.product.DriverLib",
"ti.mcu.msp430.driverlib.product");
308 po = (Proto.Obj)om.findStrict(
"ti.mcu.msp430.driverlib.product.DriverLib.Module",
"ti.mcu.msp430.driverlib.product");
309 vo.init2(po,
"ti.mcu.msp430.driverlib.product.DriverLib", $$DEFAULT,
false);
310 vo.bind(
"Module", po);
311 vo.bind(
"$category",
"Module");
312 vo.bind(
"$capsule", om.findStrict(
"ti.mcu.msp430.driverlib.product.DriverLib$$capsule",
"ti.mcu.msp430.driverlib.product"));
313 vo.bind(
"$package", om.findStrict(
"ti.mcu.msp430.driverlib.product",
"ti.mcu.msp430.driverlib.product"));
319 vo.bind(
"$$tdefs", Global.newArray(tdefs.toArray()));
320 vo.bind(
"$$proxies", Global.newArray(proxies.toArray()));
321 vo.bind(
"$$mcfgs", Global.newArray(mcfgs.toArray()));
322 vo.bind(
"$$icfgs", Global.newArray(icfgs.toArray()));
323 vo.bind(
"$$inherits", Global.newArray(inherits.toArray()));
324 ((
Value.Arr)pkgV.getv(
"$modules")).add(vo);
325 ((
Value.Arr)om.findStrict(
"$modules",
"ti.mcu.msp430.driverlib.product")).add(vo);
326 vo.bind(
"$$instflag", 0);
327 vo.bind(
"$$iobjflag", 1);
328 vo.bind(
"$$sizeflag", 1);
329 vo.bind(
"$$dlgflag", 0);
330 vo.bind(
"$$iflag", 0);
331 vo.bind(
"$$romcfgs",
"|");
332 vo.bind(
"$$nortsflag", 0);
333 Proto.Str ps = (Proto.Str)vo.find(
"Module_State");
334 if (ps !=
null) vo.bind(
"$object", ps.newInstance());
335 vo.bind(
"$$meta_iobj", om.has(
"ti.mcu.msp430.driverlib.product.DriverLib$$instance$static$init",
null) ? 1 : 0);
336 vo.bind(
"$$fxntab", Global.newArray());
337 vo.bind(
"$$logEvtCfgs", Global.newArray());
338 vo.bind(
"$$errorDescCfgs", Global.newArray());
339 vo.bind(
"$$assertDescCfgs", Global.newArray());
340 Value.Map atmap = (
Value.Map)vo.getv(
"$attr");
341 atmap.setElem(
"",
"./DriverLib.xdt");
342 atmap.seal(
"length");
343 vo.bind(
"TEMPLATE$",
"./DriverLib.xdt");
344 pkgV.bind(
"DriverLib", vo);
345 ((
Value.Arr)pkgV.getv(
"$unitNames")).add(
"DriverLib");
348 void $$INITIALIZATION()
354 Global.callFxn(
"module$meta$init", (Scriptable)om.findStrict(
"ti.mcu.msp430.driverlib.product.ProductView",
"ti.mcu.msp430.driverlib.product"));
355 Global.callFxn(
"module$meta$init", (Scriptable)om.findStrict(
"ti.mcu.msp430.driverlib.product.DriverLib",
"ti.mcu.msp430.driverlib.product"));
356 Global.callFxn(
"init", pkgV);
357 ((
Value.Obj)om.getv(
"ti.mcu.msp430.driverlib.product.ProductView")).bless();
358 ((
Value.Obj)om.getv(
"ti.mcu.msp430.driverlib.product.DriverLib")).bless();
359 ((
Value.Arr)om.findStrict(
"$packages",
"ti.mcu.msp430.driverlib.product")).add(pkgV);
362 public void exec( Scriptable xdcO, Session ses )
366 om = (
Value.Obj)xdcO.get(
"om",
null);
368 Object o = om.geto(
"$name");
369 String s = o instanceof String ? (String)o :
null;
370 isCFG = s !=
null && s.equals(
"cfg");
371 isROV = s !=
null && s.equals(
"rov");
375 ProductView$$OBJECTS();
376 DriverLib$$OBJECTS();
377 ProductView$$CONSTS();
379 ProductView$$CREATES();
380 DriverLib$$CREATES();
381 ProductView$$FUNCTIONS();
382 DriverLib$$FUNCTIONS();
383 ProductView$$SIZES();
385 ProductView$$TYPES();
392 ProductView$$SINGLETONS();
393 DriverLib$$SINGLETONS();
void exec(Scriptable xdcO, Session ses)